package com.atao.example.function03;

import java.util.Arrays;
import java.util.function.Function;

/**
 * @author 阿涛
 * @date 2021-03-06
 */
public class Test {

    public static void main(String[] args) {
        //todo 数组引用
        Function<Integer, String[]> fun = (x) -> new String[x];
        Function<Integer, String[]> fun2 = String[]::new;
        String[] strArray = fun2.apply(10);
        Arrays.stream(strArray).forEach(System.out::println);
    }

}
